<?php
	/*Pagina que insere e edita o texto de entrada do modulo*/

	session_start();
	include("/var/www/html/vivencias/conexaoBD.php");

	if(isset($_GET['edita'])){

		$queryEntrada     = "SELECT conteudoCurso FROM cursos WHERE idCurso='".$_SESSION['idCurso']."'";
		$resultadoEntrada = mysql_query($queryEntrada,$conexao);
		$objetoEntrada    = mysql_fetch_object($resultadoEntrada);
	}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Experi&ecirc;ncias do Processo de Adoecimento</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="vivencias.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="f0fefc">
<div align="center">
  <table width="600" border="0">
    <tr>
      <td align="center" valign="top">
        <table width="93%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
          <tr bgcolor="80c6bc" class="texttab">
            <td colspan="2" align="left" valign="middle" class="titprincipal">Inserir
              Conte&uacute;do</td>
            <td width="21" align="right" valign="middle" class="titprincipal"><div align="right"><a href="javascript:void(0);" onClick="javascript:var objWindow = window.open(location.href, '_self');objWindow.close();"><img src="imagens/x.jpg" width="21" height="21" border="0"></a></div></td>
          </tr>
	  <form action="insereTextoEntradaModulo.php" method="post">
          <tr bgcolor="cdede8" class="texttab">
            <td colspan="3" class="texto2"><textarea name="textoEntrada" cols="75" rows="10"><?php if(isset($_GET['edita'])){ echo $objetoEntrada->conteudoCurso;}?></textarea></td>
          </tr>
          <!--<tr bgcolor="cdede8" class="texttab">
            <td colspan="3" class="texto2">Inserir no tema
              <select name="select">
                <option value="1">Tema 1</option>
                <option value="2">Tema 2</option>
                <option value="3">Tema 3</option>
                <option value="4">Tema 4</option>
              </select></td>
          </tr>
          <tr bgcolor="cdede8" class="texttab">
            <td width="123" class="texto2">Associar</td>
            <td width="374" class="texto2"><select name="select2">
                <option value="1">Bibliografia</option>
                <option value="2">Exerc&iacute;cios</option>
                <option value="3">Casos</option>
                <option value="4">V&iacute;deos</option>
                <option value="5">Links</option>
                <option value="6">Slides</option>
                <option value="7">Textos</option>
                <option value="8">Gr&aacute;ficos</option>
                <option value="9">Imagens</option>
                <option value="10">V&iacute;deos</option>
              </select> <select name="select2">
                <option value="1">Charon R.</option>
                <option value="2">Greenhalgh T, Hurwitz B.</option>
                <option value="3">Hunter KM.</option>
                <option value="4">Kottow M.</option>
              </select></td>
            <td class="texto2">&nbsp;</td>
          </tr>-->
          <tr bgcolor="b1ddd7" class="texttab">
            <td colspan="3" class="texto2"><input type="submit" name="Submit" value="Enviar"></td>
          </tr>
	  </form>
        </table>
        <p align="center">&nbsp;</p>
        <p>&nbsp;</p>
        <p align="center">&nbsp;</p>
        <p>&nbsp;</p></td>
    </tr>
  </table>
</div>
</body>
</html>
